#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef double db;

#define in read()
#define pii pair<int,int>
#define fi first
#define se second
#define FILE(x) freopen(x".in","r",stdin);\
	freopen(x".out","w",stdout);
#define pb push_back

int read(){
	int x = 0,sgn = 1;char ch = getchar();
	for(;!isdigit(ch);ch = getchar()) if(ch == '-') sgn = -1;
	for(;isdigit(ch);ch = getchar()) x = (x<<1)+(x<<3)+(ch^48);
	return x*sgn;
}

const int N = 9e5+10;
const int mod = 1e9+7;

int n,m,k,tot;
ll fac[N],ifac[N],s[N],ans,pw3[N];

ll qp(ll x,int t){ll res=1;for(;t;t>>=1,x=x*x%mod)if(t&1)res=res*x%mod;return res;}

ll C(int x,int y){if(x < 0 || y < 0 || x < y) return 0;return fac[x] * ifac[y] % mod * ifac[x-y] % mod;}

int main (){
#ifndef ONLINE_JUDGE
	freopen("1.in","r",stdin);
#endif
	n = in,m = in,k = in; tot = n + m + k;
	for(int i = (fac[0] = pw3[0] = 1);i <= tot;i++) fac[i] = fac[i-1] * i % mod,pw3[i] = pw3[i-1] * 3 % mod; ifac[tot] = qp(fac[tot],mod-2);
	for(int i = tot - 1;i >= 0;i--) ifac[i] = ifac[i+1] * (i + 1) % mod;
	for(int i = (s[0] = 1);i <= m + k;i++)
		s[i] = (s[i-1] * 2 - C(i-1,i-k-1) - C(i-1,m)) % mod, s[i] = (s[i] + mod) % mod;
	for(int i = 0;i <= m + k;i++)
		ans = (ans + pw3[tot - i - n] * s[i] % mod * C(i + n - 1,i) % mod) % mod;
	printf("%lld\n",ans);
	return 0;
}

